package com.knowvoyage.knowvoyageserver.service;

import com.github.pagehelper.PageInfo;
import com.knowvoyage.knowvoyageserver.pojo.dto.FavoriteDTO;
import com.knowvoyage.knowvoyageserver.pojo.entity.Favorite;
import com.knowvoyage.knowvoyageserver.pojo.vo.FavoriteVO;
import com.knowvoyage.knowvoyageserver.pojo.vo.Result;
import org.springframework.beans.BeanUtils;
import org.springframework.security.core.Authentication;
import java.util.List;
import java.util.stream.Collectors;

public interface FavoriteService {
    Result<Boolean> insert(Favorite favorite);
    Result<FavoriteVO> selectById(Long favoriteId);
    Result<Favorite> selectByMessageAndUser(Long messageId, Long userId);
    PageInfo<FavoriteVO> selectAllByUser(Long userId, int pageNum, int pageSize);
    Result<List<Favorite>> selectAll();
    Result<Boolean> delete(Long favoriteId, Authentication authentication);
    Result<Boolean> update(Favorite favorite);
    Result<Boolean> batchDelete(Long currentUserId, List<Long> favoriteIds);
    Result<Integer> countByUserId(Long userId);
    Result<Integer> countByMessageId(Long messageId);
    Result<Boolean> batchInsert(List<FavoriteDTO> favoriteDTOs);




}
